package com.bit.java1;

public class Test4 {

    public static int search(int[] array) {
        int val = 0;
        for(int i = 0; i < array.length; i++) {
            val ^= array[i];
        }
        return val;
    }

    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 3, 1, 2};
        int ret = search(array);
        System.out.println(ret);
    }

}
